$('.info-btn').click(function(){
    var oldPassword = $('.oldPassword').val();
    var newPassword = $('.newPassword').val();
    var rePassword = $('.rePassword').val();
    var data = {
        oldPassword:md5(oldPassword),
        newPassword:md5(newPassword),
        rePassword:md5(rePassword)
    }
     $.ajax({
      url:"/user/pwd.json",
      type:"PATCH",
         data:JSON.stringify(data),
         contentType:'application/json;charset=UTF-8',
      success:function(data){
           $('.err-info').html('修改成功');
       },
       error: function(msg) {
           $('.err-info').html(JSON.parse(msg.responseText).errors[0].msg);
       }
   })
})